'use strict';

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
  const { router, controller } = app;
  router.get('/api/mock', controller.home.index);
  router.post('/api/login', controller.login.index);
  router.post('/api/reg', controller.login.reg);
//所有文章
  router.get('/api/allarticlesLists', controller.article.index);
  router.delete('/api/allarticlesLists', controller.article.del);
  router.post('/api/allarticlesAllDel', controller.article.allDel);
  //分类管理
  router.get("/api/classifyList",controller.article.classifyList)
  router.post("/api/addClassify",controller.article.addClassify)
  router.post("/api/findClassify",controller.article.findClassify)
//标签管理
  router.get("/api/labelList",controller.label.classifyList)
  router.post("/api/addLabel",controller.label.addClassify)
  router.post("/api/findLabel",controller.label.findClassify)
//editor页面
  router.get("/api/editorDetail",controller.editor.index)
  router.post("/api/editorList",controller.editor.list)
  //addeditor页面
  router.put("/api/addEditor",controller.editor.addEditor)
};
